package com.lagou.boot;

import com.lagou.client.RPCConsumer;
import com.lagou.model.User;
import com.lagou.service.IUserService;

public class ConsumerBoot {


    public static void main(String[] args) throws InterruptedException {

        //1.创建代理对象
        IUserService service = (IUserService) RPCConsumer.createProxy(IUserService.class);

        //2.循环给服务器写数据
        User user = new User();
        user.setId(1);
        user.setName("张三");
        while (true){
            String result = service.sayHello("are you ok !!");
            // TODO 暂未实现
//            String result = service.updateInfo(user);
//            String result = service.getUser(1, "张三");
            System.out.println(result);
            Thread.sleep(2000);
        }

    }
}
